package com.woniuxy.service.impl;

import com.woniuxy.Dto.TopicArrayIdDTo;
import com.woniuxy.Dto.TopicPage;
import com.woniuxy.dao.TopicDao;
import com.woniuxy.entity.TopicTable;
import com.woniuxy.service.TopicDaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * description: TopicDaoServiceimpl <br>
 * date: 2022/5/31 5:52 下午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */
@Service
public class TopicDaoServiceImpl implements TopicDaoService {
    @Autowired
    private TopicDao topicDao;

    @Override
    public List<TopicTable> findAllTopic() {
        return topicDao.findAllTopic();
    }

    @Override
    public List<TopicTable> findAllTopicPage(TopicPage topicPage) {
        return topicDao.findAllTopicPage(topicPage);
    }

    @Override
    public int deleteTopicById(Integer id) {
        return topicDao.deleteTopicById(id);
    }

    @Override
    public int deleteTopics(TopicArrayIdDTo topicArrayIdDTo) {
        return topicDao.deleteTopics(topicArrayIdDTo);
    }

    @Override
    public int updateTopic(TopicTable topicTable) {
        return topicDao.updateTopic(topicTable);
    }

    //根据题目表id，展示题目的属于什么题目类型，什么难易程度
    @Override
    public List<TopicTable> findTopicById(Integer topicId) {
        return topicDao.findTopicById(topicId);
    }
}
